// /**
// //  * Magento
//  *
//  * NOTICE OF LICENSE
//  *
//  * This source file is subject to the Academic Free License (AFL 3.0)
//  * that is bundled with this package in the file LICENSE_AFL.txt.
//  * It is also available through the world-wide-web at this URL:
//  * http://opensource.org/licenses/afl-3.0.php
//  * If you did not receive a copy of the license and are unable to
//  * obtain it through the world-wide-web, please send an email
//  * to license@magentocommerce.com so we can send you a copy immediately.
//  *
//  * DISCLAIMER
//  *
//  * Do not edit or add to this file if you wish to upgrade Magento to newer
//  * versions in the future. If you wish to customize Magento for your
//  * needs please refer to http://www.magentocommerce.com for more information.
//  *
//  * @category    design
//  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
//  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
//  */

@autocomplete-background: #fff;
@autocomplete-border: 1px solid @form-element-input-border-color;
@autocomplete-item-border: 1px solid #e5e5e5;
@autocomplete-item-hover: #e8e8e8;
@autocomplete-item-amount-color: #999;

.block-search {
    margin-bottom: 0;
    .block {
        &-title {
            display: none;
        }
    }
    .label {
        .icon-font(
            @_icon-font-content: @icon-search,
            @_icon-font-size: 35px,
            @_icon-font-line-height: 33px,
            @_icon-font-text-hide: true
            );
        display: inline-block;
        float: right;
        &:active,
        &:focus {
            outline: none !important;
        }
    }
    .action.search {
        display: none;
    }
    .control {
        border-top: 1px solid @border-color-base;
        clear: both;
        margin: 0 -@layout-width-xs-indent -1px;
        padding: 0 @layout-width-xs-indent;
    }

    input {
        left: -300%;
        position: absolute;
        margin: 15px 0;
        &:focus {
            position: static;
        }
    }
    .nested {
        display: none;
    }

}

.search-autocomplete {
    display: none;
    position: absolute;
    z-index: 3;
    overflow: hidden;
    margin-top: -15px;
    &:extend(.abstract-add-box-sizing all);
    ul {
        .list-reset-styles();
        li {
            &:not(:empty) {
                background: @autocomplete-background;
                border: @autocomplete-border;
                border-top: 0;
            }
            border-top: @autocomplete-item-border;
            cursor: pointer;
            padding: 5px 40px 5px 10px;
            margin: 0;
            position: relative;
            text-align: left;
            white-space: normal;
            &:first-child {
                border-top: none;
            }
            &:hover,
            &.selected {
                background: @autocomplete-item-hover;
            }
            .amount {
                color: @autocomplete-item-amount-color;
                position: absolute;
                right: 7px;
                top: 5px;
            }
        }
    }
}

.form.search.advanced {
    .fields.range {
        .field {
            &:first-child {
                position: relative;
                .control {
                    padding-right: 25px;
                    &:after {
                        content: ' \2013 ';
                        display: inline-block;
                        text-align: center;
                        width: 25px;
                        position: absolute;
                        right: 0;
                        top: 6px;
                    }
                }
            }
            &:last-child {
                position: relative;
                input {
                    width: 88%;
                }
                div.mage-error[generated] {
                    position: absolute;
                    top: 32px;
                    left: 0;
                }
            }
        }
    }
    .group.price {
        .addon {
            .addafter {
                border: none;
                padding-top: 6px;
                vertical-align: top;
            }
        }
    }
}

//
//    Desktop
//--------------------------------------
.responsive(@break) when (@break = @screen-m) {
    .block-search {
        position: relative;
        float: right;
        padding-left: 15px;
        width: 250px;
        z-index: 4;
        .label {
            &:extend(.abstract-visually-hidden-desktop all);
        }
        .control {
            border-top: 0;
            margin: 0;
            padding: 0 0 25px;
        }
        .nested {
            display: block;
            padding-top: 5px;
            position: absolute;
        }
        input {
            position: static;
            padding-right: 35px;
            margin: 0;
            .input-placeholder(@form-element-input-placeholder-color);
        }
        .action.search {
            position: absolute;
            display: inline-block;
            right: 10px;
            top: 0;
            z-index: 1;
            .button-icon(
                @_icon-font-content: @icon-search,
                @_icon-font-text-hide: true,
                @_icon-font-color: #666
            );
            .button-reset();
            &:focus {
                outline: none;
                &:before {
                    color: #333;
                }
            }
            padding: 5px 0;
        }
    }
    .search-autocomplete {
        margin-top: 0;
    }
}
